package com.liuyuxing.test.service.impl;

import com.liuyuxing.test.entity.Fruit;
import com.liuyuxing.test.service.PromotionStrategyService;
import com.liuyuxing.test.service.ShoppingCartService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ShoppingCartServiceImpl implements ShoppingCartService {
    @Override
    public double calculateTotal(List<Fruit> fruits, PromotionStrategyService promotionStrategyService) {
        return promotionStrategyService.applyPromotion(fruits);
    }
}
